package com.mallcloud.mall.admin.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.mallcloud.mall.common.core.model.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@ApiModel(value = "SysDept", description = "部门")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_sys_dept", autoResultMap = true)
public class SysDept extends BaseModel {

	@TableId(value = "dept_id", type = IdType.AUTO)
	@ApiModelProperty(value = "部门id")
	private Long deptId;

	@NotBlank(message = "部门名称不能为空")
	@ApiModelProperty(value = "部门名称")
	private String name;

	@NotNull(message = "排序值不能为空")
	@ApiModelProperty(value = "排序值")
	private Integer sortOrder;

	@ApiModelProperty(value = "父级部门id")
	private Long parentId;

}
